-- GENERATED SPELL FOR [Olm the Summoner] --


function spell0_18834(pUnit, Event) --@Dark Decay,n/a--
pUnit:FullCastSpellOnTarget(33129,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18834', 10000, 1)
end

function spell1_18834(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(33130,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18834', 3348, 1)
end

function spell2_18834(pUnit, Event) --@Summon Wild Felhunter,Self--
pUnit:FullCastSpellOnTarget(33131,pUnit)
pUnit:RegisterEvent('Sorts_18834', 3000, 1)
end

function Sorts_18834(pUnit, Event)
local choix_sorts_18834 = math.random(0, 2)
if choix_sorts_18834 == 0 then
pUnit:RegisterEvent('spell0_18834', 1, 1)
end
if choix_sorts_18834 == 1 then
pUnit:RegisterEvent('spell1_18834', 1, 1)
end
if choix_sorts_18834 == 2 then
pUnit:RegisterEvent('spell2_18834', 1, 1)
end
end

function mob18834_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18834', math.random(1500, 3000), 1)
end

function mob18834_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18834_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18834_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18834, 1, 'mob18834_Action')
RegisterUnitEvent(18834, 2, 'mob18834_Leave')
RegisterUnitEvent(18834, 3, 'mob18834_Kill')
RegisterUnitEvent(18834, 4, 'mob18834_Die')
